import { defineStore } from 'pinia'
// import type { user } from '@/utils/dataType/DataModel'

export const userRegisterMessageStore = defineStore('message', {
  state: () => ({
    userInformation: {
      username: '',
      password: '',
      email: '',
      sex: '',
      phone: '',
      birthday: '',
      name: '',
    },
  }),
  actions: {
    setUserInformation(newInformation: object) {
      this.userInformation = newInformation
    },
    //清空数据
    clearData() {
      this.userInformation = {
        username: '',
        password: '',
        email: '',
        sex: '',
        phone: '',
        birthday: '',
        name: '',
      }
    },
  },
})
